1. Field of the Invention
This invention relates to the transmission of data through a communications network and incorporates a unique process for calculating data checksums.
2. Related Art
In computer networks, data is often transmitted from one computer to another using a data transfer protocol. Some of the major protocols in use include Open Systems Interconnection (OSI), Transfer Control Protocol/Internet Protocol (TCP/IP), Decnet, Telnet, XNS, IPX, AppleTalk and others. The invention is intended to work with protocols now in existence or protocols which may be developed in the future, but the invention is particularly useful when the protocol uses a checksum which may be defined to allow transfer of data in small pieces.
The transmitting computer obtains the data to be transmitted from a data source (such as a hard disk, DMA or other source) and caches the data in memory. The data is then copied from the application layers to the network layers and ultimately transmitted to the communications network.
One problem is that copying the data through a data transfer protocol takes numerous CPU cycles and memory accesses and, thus, slows the transmission process. A method that is sometimes used to avoid copying the data through data transfer protocol is creating a data pointer 114 in the application layer and sending that pointer to the network and transmission layers instead of copying the data itself. Fewer CPU cycles and memory accesses are used to transmit the data pointer 114 than to copy the data itself. The network layers use the data pointer 114 to locate the data cached in memory and transmit it through the communications network.
One problem with the method of using a data pointer 114 to speed up the transmission process is that it is that much of the efficiency of transferring the data pointer 114 is lost when the transport layer subsequently needs to read all the data to calculate the checksum. It takes fewer CPU cycles and memory accesses to transfer a data pointer 114 than to copy data through protocol. But CPU cycles and memory accesses are required to read the data cached or stored in memory in order to calculate the checksums. Thus, the economy otherwise gained by transferring a data pointer 114 instead of copying data is diminished because the CPU cycles and memory accesses are required to read the data to calculate the checksums.
The invention provides a method and process for transmitting data using fewer CPU cycles and memory accesses to calculate checksums. The transmitting device obtains data from an internal or external data source and stores that data in memory. The data is then divided into fixed sized zones and checksums are calculated for each zone. The checksums are recorded on a checksum array 115. A data pointer 114 containing an address for the data stored in memory, a description of the data and an address for the checksum array 115 is transferred through data transfer protocol to the network and transmission layers. The network and transmission layers are then able to access and send the data without having to copy or read all of the data to calculate the checksums. This method and process uses fewer CPU cycles and memory accesses to transmit data and is, therefore, more efficient than the prior art.